<template>
    <div>
        <Row>
            <Col style="text-align:center"><h1>平台服务</h1></Col>
        </Row>
        <Row style="margin-top:20px;padding-bottom:20px;font-size:14px">
            <Col span="2">
                  <Button style="background-color:#143f87;color:white" size="large">服务查询</Button>
            </Col>
            <Col span="20" style="padding-left:8px">   
                <Input v-model="page.action_data.title"  size="large">    
                </Input>
            </Col>
            <Col span="2">
                <Button style="background-color:#143f87;color:white" size="large" @click="handleSearch">搜索</Button>
            </Col>
        </Row>
        <Row>
            <Col span="24">
                <Card v-for="item in list" class="content">
                <router-link :to="{name:'specialservice_detail',params:{id: item.id}}">
                    <p >                                                    
                            <h2 style="text-align:center;color:black">{{item.title}}</h2>
                    </p>
                    <Row>
                    <Col span="15">
                    <h3><p style="color:black;">服务内容：</p></h3>
                   
                    <div class=""><p style="color:black;">&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp{{formatContent(item.content)}}</p></div>
                    </Col>
                    <Col span="5" offset="4">
                    <h4><p style="color:black;">发布时间：{{dateformat(item.create_time)}}</p></h4>
                    </Col></Row></router-link>
                </Card>
            </Col>
        </Row>
        <div style="margin-bottom:20px">
            <AutoPage v-model="page"></AutoPage>
        </div>
    </div>
</template>
<script>
    import Vue from 'vue';
    import Page from "@/common/model/Page";
    import AutoPage from "@/common/components/AutoPage";
    import PlateformService from "@/common/model/PlateformService"
    import StepsEditor from "@/common/components/StepsEditor"
export default {
    data(){

        return{
            page: new Page("search/plateform_service",{title:''}),
            title: ''
        }
    },
    methods:{
        handleSearch() {
            this.page.getData();
        },
       dateformat(a){
            return new Date(parseInt(a)).toLocaleDateString()+" "+new Date(parseInt(a)).getHours()+":"+new Date(parseInt(a)).getMinutes();
        },
        formatContent(mes){
            if(mes.length>50){
                mes=mes.substring(0,50)+"……";
            }
            return mes;
        },
    },
    computed:{
        list() {
            return this.page.list;
        }
    },
    components:{
        AutoPage
    }
}
</script>
<style scoped>
    .content{
        margin-top: 5px;
        padding-bottom: 5px;
    }
    
</style>
